| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkAstraeus::PbsEnvironmentMapFilter Class Referencefinal

Provides tools to filter environment maps and improve IBL within the PbsMaterial. More...

## Public Member Functions
| PbsEnvironmentMapFilter (System *system) noexcept
| ~PbsEnvironmentMapFilter ()
void | requestEnvironmentMapFiltering (nkGraphics::Texture *envMap, nkGraphics::Texture *outFilteredMap, unsigned int outPixelDims=128)
void | requestIrradianceComputing (nkGraphics::Texture *input, nkGraphics::Texture *output)

## Detailed Description

Provides tools to filter environment maps and improve IBL within the PbsMaterial.

## Constructor & Destructor Documentation

## ◆ PbsEnvironmentMapFilter()

nkAstraeus::PbsEnvironmentMapFilter::PbsEnvironmentMapFilter | ( | System * | system | ) |
| noexcept

Constructor.

Parameters

  system | The system the instance should live in.

## ◆ ~PbsEnvironmentMapFilter()

nkAstraeus::PbsEnvironmentMapFilter::~PbsEnvironmentMapFilter | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ requestEnvironmentMapFiltering()

void nkAstraeus::PbsEnvironmentMapFilter::requestEnvironmentMapFiltering | ( | nkGraphics::Texture * | envMap,
|  | nkGraphics::Texture * | outFilteredMap,
|  | unsigned int | outPixelDims = `128`
| ) |  |

Requests the filtering of an environment map.

This tool accepts cube and 2d environment maps.

For best result, it is advised to provide an environment map with its full mip chain available. The filtering will be able to interpolate better the roughness levels and this will help in reducing noise in the final result, for rough parameters.

Parameters

  envMap | The environment map to filter. Can be a cube-map or a spherical environment map.
  outFilteredMap | The texture in which to output the result. The texture will be a cube map at the end of the processing.
  outPixelDims | The size, in pixels, of one face of the resulting cube map. The face will be of dimensions outPixelDims x outPixelDims.

Remarks
  To ensure result is correct, the envMap needs to be loaded. This method generates pre-filtered environment maps, which can be used within the PbsMaterial. Generated maps correspond to the first element of the split-sum introduced by Epic to simplify IBL. It can be used to improve performances for the material, as it requires a lot less samples than the standard way.

## ◆ requestIrradianceComputing()

void nkAstraeus::PbsEnvironmentMapFilter::requestIrradianceComputing | ( | nkGraphics::Texture * | input,
|  | nkGraphics::Texture * | output
| ) |  |

Computes the irradiance map of a texture.

This tool accepts cube and 2d environment maps.

This function will compute the values from the input texture's first mip, using spherical harmonics.

Parameters

  input | The texture from which to compute the irradiance map.
  output | The texture that will receive the irradiance computed.

Remarks
  To ensure the result is correct, the input needs to be loaded.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsAstraeus/Graphics/Materials/Utils/PbsEnvironmentMapFilter.h